package com.aptemo.webetek.client.widgets.stakes;

import java.util.Date;

import com.aptemo.webetek.client.WebetekUserServiceAsync;
import com.aptemo.webetek.client.mvp.BaseDisplay;
import com.aptemo.webetek.client.mvp.BasePresenter;
import com.aptemo.webetek.shared.BetBean;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.ui.HasValue;
import com.google.gwt.user.client.ui.HasWidgets;

public class StakeRowPresenter implements BasePresenter
{

	public interface Display extends BaseDisplay
	{
		HasValue<Date> getStakeDateField();

		HasValue<Double> getStakeAmount();

		HasValue<Double> getOddsField();

		// HasText getStatusField();

		HasValue<Double> getWinningsField();
	}

	private Display			display;
	private HandlerManager	meventbus;
	private BetBean			data;

	public StakeRowPresenter(BetBean data, HandlerManager eventbus, Display display, WebetekUserServiceAsync rpc)
	{
		meventbus = eventbus;
		this.display = display;
		this.data = data;
	}

	private void bind()
	{
		// display.getStakeAmount().setValue(data.getAmount());
		//
		// Date date = data.getDate();
		// display.getStakeDateField().setValue(date);
		// display.getStatusField().setText(data.getStatus().toString());
	}

	@Override
	public void go(HasWidgets container)
	{
		bind();

	}
}
